/**
 * 
 */
package ru.cargobroker.maip.contracts.domain;

import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Version;

import ru.cargobroker.maip.base.db.DbConstants;
import ru.cargobroker.maip.base.domain.BaseEntity;

/**
 * Base Insured object for all kinds of insurance
 * 
 * 
 * @author M.Frendiy
 * @since 0.0.1
 */
@Entity
@Table(name="INS_OBJECT")
public abstract class InsObject extends BaseEntity  {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5843742258440487942L;

	/**
	 * Enable the JPA-managed optimistic locking transaction strategy (using versions)
	 */
	@Version
	private int version;
	
	/**
	 * Name of Insurance object
	 */
	@Column(name="OBJECT_NAME", length=DbConstants.NAME_BIG_LEN)
	private String objectName;
	
	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public String getObjectName() {
		return objectName;
	}

	public void setObjectName(String objectName) {
		this.objectName = objectName;
	}

}
